﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Vit.Common.Helpers
{
    public class FileHelper
    {
        public static DirectoryInfo GetDirectory(string path, bool createIfNotExists)
        {
            DirectoryInfo dir = new DirectoryInfo(path);
            if (!dir.Exists)
            {
                if (createIfNotExists)
                    dir.Create();
            }
            return dir;
        }
    }
}
